/**
 * 保存所选环数
 */
let selectRings = {
    namespaced: true,
    state:{
        selectRingData:[],
		isNeedDisabled:false,	//继续填报按钮和重新上报按钮是否需要禁用
    },
    mutations:{
		setSelectRingData(state, value) {
			state.selectRingData = value;
		},
		addData(state, val){
			state.selectRingData.push(val);
		},
		deleteDataForIndex(state, index){
			console.log('删除值',index)
			state.selectRingData.splice(index, 1);
			// {data:Array , index:number}
			state.selectRingData.forEach((it, key) => {
				it.index = key;
			})
		},
		insertChangeData(state, obj, index){
			// state.selectRingData[index] = obj;
			
			state.selectRingData.splice(obj && obj.index, 1 , obj);
		}
    },
    actions:{

    }
}
export default selectRings